/**
* @description: 1374. 生成每种字符都是奇数个的字符串
* @author hewei
* @date 2022/8/3 16:25
* @version 1.0
*/

public class GenerateTheString {

    public String generateTheString(int n) {
        StringBuilder stringBuilder = new StringBuilder();
        for (int i = 0; i < n - 1; i++) {
            stringBuilder.append('a');
        }
        if (n % 2 == 0) {
            stringBuilder.append('b');
        } else {
            stringBuilder.append('a');
        }
        return stringBuilder.toString();
    }
}
